<%= form_for([@book, @chunk]) do |f| %>
    <% if @chunk.errors.any? %>
        <div id="error_explanation">
          <h2><%= t 'activerecord.errors.template.header', :model => Chunk.model_name.human, :count => @chunk.errors.count %></h2>

          <ul>
            <% @chunk.errors.full_messages.each do |msg| %>
                <li><%= msg %></li>
            <% end %>
          </ul>
        </div>
    <% end %>

    <%= f.hidden_field :original_updated_at %>

    <div class="field">
      <%= f.label :title %>
      <br/>
      <%= f.text_field :title %>
    </div>
    <div class="field">
      <%= f.label :section %>
      <br/>
      <%= f.text_field :section %>
    </div>
    <div class="field">
      <%= f.label :user %>
      <br/>
      <%= f.collection_select(:user_id, User.all, :id, :username) %>
    </div>
    <div class="field">
      <%= f.cktext_area :content %>
    </div>
    <div class="actions">
      <%= f.submit %>
    </div>
<% end %>
